export function timeOut(oldTime) {
  const shenYuTime = (new Date(oldTime)) - (new Date())
  if (shenYuTime <= 0) {
    return '00 00:00:00'
  }
  let days = parseInt(shenYuTime / 1000 / 60 / 60 / 24, 10)
  let hours = parseInt(shenYuTime / 1000 / 60 / 60 % 24, 10)
  let minutes = parseInt(shenYuTime / 1000 / 60 % 60, 10)
  let seconds = parseInt(shenYuTime / 1000 % 60, 10)
  function check(checkNum) {
    const num = checkNum < 10 ? '0' + checkNum : checkNum
    return num
  }
  days = check(days)
  hours = check(hours)
  minutes = check(minutes)
  seconds = check(seconds)
  return `${days} ${hours}:${minutes}:${seconds}`
}
